package com.imooc.spark

import org.apache.spark.sql.SparkSession

object SchemaInferAPP {

  def main(args: Array[String]): Unit = {
    val spark = SparkSession
      .builder()
      .appName("SchemaInferAPP")
      .master("local[2]")
      .getOrCreate()


    val df = spark.read.format("json").load("file:///D:\\CodingFiles\\IdeaProjects\\ImoocSparkSQLProject\\data\\json_schema_infer.json")

    df.printSchema()

    df.show()

    spark.close()
  }
}
